﻿ 
using Microsoft.Extensions.DependencyInjection;
using Quartz.Spi;
using System;

namespace DingTalk.Extensions
{
    /// <summary>
    /// 任务调度 启动服务
    /// </summary>
    public static class JobSetup
    {
        public static void AddJobSetup(this IServiceCollection services)
        {
            //if (services == null) throw new ArgumentNullException(nameof(services));

            ////services.AddHostedService<Job1TimedService>();
            ////services.AddHostedService<Job2TimedService>();

            //services.AddSingleton<IJobFactory, JobFactory>();

            //#region 订单
            //services.AddTransient<Job_CLoseOrder>();
            //services.AddTransient<Job_CompleteOrder>();
            //#endregion

            //#region 用户
            //services.AddTransient<Job_ExpireCoupon>();
            //services.AddTransient<Job_RewardCoupon>();
            //#endregion

            //services.AddSingleton<ISchedulerCenter, SchedulerCenterServer>();
        }
    }
}
